//
//  WJPublishButton.m
//  BaiSiBuDeJie
//
//  Created by jerrywang on 2017/10/15.
//  Copyright © 2017年 王军. All rights reserved.
//

#import "WJPublishButton.h"

@implementation WJPublishButton

- (instancetype) initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        self.titleLabel.textAlignment = NSTextAlignmentCenter;
        self.titleLabel.font = [UIFont systemFontOfSize:15];
        [self setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    }
    return self;
}

- (void) layoutSubviews {
    [super layoutSubviews];
    
    self.imageView.wj_y = 0;
    self.imageView.wj_centerX = self.wj_width * 0.5;
    
    self.titleLabel.wj_width = self.wj_width;
    self.titleLabel.wj_y = CGRectGetMaxY(self.imageView.frame);
    self.titleLabel.wj_x = 0;
    self.titleLabel.wj_height = self.wj_height - self.titleLabel.wj_y;
    
}

@end
